<template>
    <uni-popup ref="popup" type="bottom" :safe-area='false'>
        <view class="content">

            <view class="headBox">

                <text></text>

                <view class="close" @click.stop="closeBox">
                    <text class=" iconfont ">&#xeca0;</text>
                </view>

            </view>

            <div class="words-box" v-if=" mode == 'server' ">
                <div v-for="item,idx in noticeArr" :key="idx" class="words-i">
                    <div class="left-img"><img src="/static/images/g_gou1.png"></div>
                    <div class="tit">
                        <span>{{item.name}}</span>
                    </div>
                    <div class="desc">
                        <span>{{item.desc}}</span>
                    </div>
                </div>
            </div>

            <div class="words-box goodsDesc" v-if=" mode == 'desc' ">
                <text class="col-hui ">{{ json.goodsDesc }}</text>
            </div>   
         
        </view>
    </uni-popup>
</template>

<script>
import uniPopup from '@/components/uni-popup/uni-popup/uni-popup'

export default {
    props: ['json'],
    components: { uniPopup },
    data() {
        return {
            noticeArr:[
                {name:"保密配送",desc:"快递严密包裹，保密邮寄,快递单统一注明为【礼品】,我们为您的隐私保驾护航"},
                {name:"7天退换货",desc:"商品质量问题可退换货(需满足退换货标准),联系客服处理;非质量问题，拆封后不可享"},
                {name:"正品保障",desc:"在本商城出售的商品均接受国家质量监督检验中心的检测，质量享有充分的保障"},
                {name:"专业顾问",desc:"专业两性顾问团队，为您提供1V1高质量服务"},
                {name:"同城配送",desc:"同城下单立即配送"},
            ],
            mode:'server' //server desc
        }
    },

    onShow() {},
    mounted() {
    },
    methods: {
        showFunc(type){

            this.mode = type

            this.openFunc()

        },
        openFunc () {

            this.$refs['popup'].open()
        },
        closeBox(){
            this.$refs['popup'].close()
        },
        goPrival(e) {
           
        },
        finish(){

            console.log('用户同意隐私协议事件回')

            this.closeBox()

            this.$emit('finish')
        }
    },
}
</script>

<style scoped lang="scss">
.content{
    background: #fff;
    border-radius: 26rpx 26rpx 0 0 ;
    min-height: 40vh;
}
.headBox{
    position: relative;
    padding: 50rpx 40rpx 32rpx; 
    font-size: 34rpx;
    color: #000;
    line-height: 1.1;
    text-align: center;
    font-weight: bold;
    .close{
        position: absolute;
        right: 0;
        top: 0;
        width: 100rpx;
        text-align: center;
        padding: 30rpx;
        color: #777;
        font-size: 34rpx;
        z-index: 1;
    }
  
}
.words-box{
    padding:0 40rpx 160rpx;
    .words-i{
        position: relative;
        padding-left: 90rpx;
        margin-bottom: 10rpx;
    }
    .left-img{
        position: absolute;
        left: 0;
        top: 8rpx;
        img{
            width: 32rpx;
            height: 32rpx;
            margin:0 6rpx;
        }
    }
    .tit{
        font-size: 30rpx;
        color: #000;
    }
    .desc{
        font-size: 26rpx;
        color: #999;
        line-height: 1.8;
        padding: 10rpx 0;
    }
}
.goodsDesc{
    line-height: 2;
}

</style>
